package com.gdust.gkyx.activity.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gdust.gkyx.model.activity.ActivityInfo;
import com.gdust.gkyx.model.order.CartInfo;
import com.gdust.gkyx.model.product.SkuInfo;
import com.gdust.gkyx.vo.activity.ActivityRuleVo;
import com.gdust.gkyx.vo.order.CartInfoVo;
import com.gdust.gkyx.vo.order.OrderConfirmVo;

import java.util.List;
import java.util.Map;

/**
 * ClassName: ActivityInfoService
 * Package: com.gdust.gkyx.activity.service
 * Description:
 *
 * @Author syun
 * @Create 2025/1/26 16:11
 * @Version 1.0
 */
public interface ActivityInfoService extends IService<ActivityInfo> {
    //列表
    IPage<ActivityInfo> selectPage(Page<ActivityInfo> pageParam);

    //1 根据活动id获取活动规则数据
    Map<String, Object> findActivityRuleList(Long activityId);

    //2 在活动里面添加规则数据
    void saveActivityRule(ActivityRuleVo activityRuleVo);

    //3 根据关键字查询匹配sku信息
    List<SkuInfo> findSkuInfoByKeyword(String keyword);

    /**
     * //获取购物车里面满足条件优惠卷和活动的信息
     * @param cartInfoList
     * @param userId
     * @return
     */
    OrderConfirmVo findCartActivityAndCoupon(List<CartInfo> cartInfoList, Long userId);

    //获取购物车对应规则数据
    List<CartInfoVo> findCartActivityList(List<CartInfo> cartInfoList);

    //根据skuId列表获取促销信息
    Map<Long, List<String>> findActivity(List<Long> skuIdList);

    //根据skuID获取营销数据和优惠卷
    Map<String, Object> findActivityAndCoupon(Long skuId, Long userId);
}
